home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1989 …il & Dave's Excellent CD / Excellent CD HFS.raw / Moof / Goodies / MPW Goodies / Interfaces / CIncludes / Video.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-11-30  |  5.5 KB  |  164 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Tuesday, October 4, 1988 at 10:09 PM
  4.     Video.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.  1986-1988
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __VIDEO__
  15. #define __VIDEO__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #endif
  20.  
  21. #define mBaseOffset 1       /*Id of mBaseOffset.*/
  22. #define mRowBytes 2         /*Video sResource parameter Id's */
  23. #define mBounds 3           /*Video sResource parameter Id's */
  24. #define mVersion 4          /*Video sResource parameter Id's */
  25. #define mHRes 5             /*Video sResource parameter Id's */
  26. #define mVRes 6             /*Video sResource parameter Id's */
  27. #define mPixelType 7        /*Video sResource parameter Id's */
  28. #define mPixelSize 8        /*Video sResource parameter Id's */
  29. #define mCmpCount 9         /*Video sResource parameter Id's */
  30. #define mCmpSize 10         /*Video sResource parameter Id's */
  31. #define mPlaneBytes 11      /*Video sResource parameter Id's */
  32. #define mVertRefRate 14     /*Video sResource parameter Id's */
  33. #define mVidParams 1        /*Video parameter block id.*/
  34. #define mTable 2            /*Offset to the table.*/
  35. #define mPageCnt 3          /*Number of pages*/
  36. #define mDevType 4          /*Device Type*/
  37. #define oneBitMode 128      /*Id of OneBitMode Parameter list.*/
  38. #define twoBitMode 129      /*Id of TwoBitMode Parameter list.*/
  39. #define fourBitMode 130     /*Id of FourBitMode Parameter list.*/
  40. #define eightBitMode 131    /*Id of EightBitMode Parameter list.*/
  41. #define cscReset 0          /*Control Codes*/
  42. #define cscSetMode 2        /*Control Codes*/
  43. #define cscSetEntries 3     /*Control Codes*/
  44. #define cscGrayPage 5
  45. #define cscSetGray 6
  46. #define cscGetMode 2        /*Status Codes*/
  47. #define cscGetEntries 3     /*Status Codes*/
  48. #define cscGetPageCnt 4     /*Status Codes*/
  49. #define cscGetPageBase 5    /*Status Codes*/
  50.  
  51. struct VPBlock {
  52.     long vpBaseOffset;      /*Offset to page zero of video RAM (From minorBaseOS).*/
  53.     short vpRowBytes;       /*Width of each row of video memory.*/
  54.     Rect vpBounds;          /*BoundsRect for the video display (gives dimensions).*/
  55.     short vpVersion;        /*PixelMap version number.*/
  56.     short vpPackType;
  57.     long vpPackSize;
  58.     long vpHRes;            /*Horizontal resolution of the device (pixels per inch).*/
  59.     long vpVRes;            /*Vertical resolution of the device (pixels per inch).*/
  60.     short vpPixelType;      /*Defines the pixel type.*/
  61.     short vpPixelSize;      /*Number of bits in pixel.*/
  62.     short vpCmpCount;       /*Number of components in pixel.*/
  63.     short vpCmpSize;        /*Number of bits per component*/
  64.     long vpPlaneBytes;      /*Offset from one plane to the next.*/
  65. };
  66.  
  67. #ifndef __cplusplus
  68. typedef struct VPBlock VPBlock;
  69. #endif
  70.  
  71. typedef VPBlock *VPBlockPtr;
  72.  
  73. struct VDEntryRecord {
  74.     Ptr csTable;            /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
  75. };
  76.  
  77. #ifndef __cplusplus
  78. typedef struct VDEntryRecord VDEntryRecord;
  79. #endif
  80.  
  81. typedef VDEntryRecord *VDEntRecPtr;
  82.  
  83. struct VDGrayRecord {
  84.     Boolean csMode;         /*Same as GDDevType value (0=mono, 1=color)*/
  85. };
  86.  
  87. #ifndef __cplusplus
  88. typedef struct VDGrayRecord VDGrayRecord;
  89. #endif
  90.  
  91. typedef VDGrayRecord *VDGrayPtr;
  92.  
  93. /* Parm block for SetGray control call */
  94. struct VDSetEntryRecord {
  95.     ColorSpec *csTable;     /*Pointer to an array of color specs*/
  96.     short csStart;          /*Which spec in array to start with, or -1*/
  97.     short csCount;          /*Number of color spec entries to set*/
  98. };
  99.  
  100. #ifndef __cplusplus
  101. typedef struct VDSetEntryRecord VDSetEntryRecord;
  102. #endif
  103.  
  104. typedef VDSetEntryRecord *VDSetEntryPtr;
  105.  
  106. /* Parm block for SetEntries control call */
  107.  
  108. struct VDPageInfo {
  109.     short csMode;           /*(word) mode within device*/
  110.     long csData;            /*(long) data supplied by driver*/
  111.     short csPage;           /*(word) page to switch in*/
  112.     Ptr csBaseAddr;         /*(long) base address of page*/
  113. };
  114.  
  115. #ifndef __cplusplus
  116. typedef struct VDPageInfo VDPageInfo;
  117. #endif
  118.  
  119. typedef VDPageInfo *VDPgInfoPtr;
  120.  
  121. struct VDSizeInfo {
  122.     short csHSize;          /*(word) desired/returned h size*/
  123.     short csHPos;           /*(word) desired/returned h position*/
  124.     short csVSize;          /*(word) desired/returned v size*/
  125.     short csVPos;           /*(word) desired/returned v position*/
  126. };
  127.  
  128. #ifndef __cplusplus
  129. typedef struct VDSizeInfo VDSizeInfo;
  130. #endif
  131.  
  132. typedef VDSizeInfo *VDSzInfoPtr;
  133.  
  134. struct VDSettings {
  135.     short csParamCnt;       /*(word) number of params*/
  136.     short csBrightMax;      /*(word) max brightness*/
  137.     short csBrightDef;      /*(word) default brightness*/
  138.     short csBrightVal;      /*(word) current brightness*/
  139.     short csCntrstMax;      /*(word) max contrast*/
  140.     short csCntrstDef;      /*(word) default contrast*/
  141.     short csCntrstVal;      /*(word) current contrast*/
  142.     short csTintMax;        /*(word) max tint*/
  143.     short csTintDef;        /*(word) default tint*/
  144.     short csTintVal;        /*(word) current tint*/
  145.     short csHueMax;         /*(word) max hue*/
  146.     short csHueDef;         /*(word) default hue*/
  147.     short csHueVal;         /*(word) current hue*/
  148.     short csHorizDef;       /*(word) default horizontal*/
  149.     short csHorizVal;       /*(word) current horizontal*/
  150.     short csHorizMax;       /*(word) max horizontal*/
  151.     short csVertDef;        /*(word) default vertical*/
  152.     short csVertVal;        /*(word) current vertical*/
  153.     short csVertMax;        /*(word) max vertical*/
  154. };
  155.  
  156. #ifndef __cplusplus
  157. typedef struct VDSettings VDSettings;
  158. #endif
  159.  
  160. typedef VDSettings *VDSettingsPtr;
  161.  
  162.  
  163. #endif
  164.